/*  1:   */ package com.jetbrains.licenseServer.openapi.responses;
/*  2:   */ 
/*  3:   */

import com.jetbrains.licenseServer.openapi.requests.ObtainTicketRequest;

import java.util.HashMap;
import java.util.Map;
import java.util.StringTokenizer;

/*  4:   */
/*  5:   */
/*  6:   */
/*  7:   */ 
/*  8:   */ public class ObtainTicketResponse
/*  9:   */   extends AbstractResponse
/* 10:   */ {
/* 11:   */   private String d;
/* 12:   */   private String e;
/* 13:   */   private long f;
/* 14:   */   
/* 15:   */   public ObtainTicketResponse() {}
/* 16:   */   
/* 17:   */   public ObtainTicketResponse(String paramString1, ResponseCode paramResponseCode, String paramString2, String paramString3, long paramLong)
/* 18:   */   {
/* 19:21 */     super(paramResponseCode, paramString3, paramLong);
/* 20:22 */     this.d = paramString1;
/* 21:23 */     this.e = paramString2;
/* 22:   */   }
/* 23:   */   
/* 24:   */   public String getTicketId()
/* 25:   */   {
/* 26:27 */     return this.d;
/* 27:   */   }
/* 28:   */   
/* 29:   */   public void setTicketId(String paramString)
/* 30:   */   {
/* 31:31 */     this.d = paramString;
/* 32:   */   }
/* 33:   */   
/* 34:   */   public String getTicketProperties()
/* 35:   */   {
/* 36:35 */     return this.e;
/* 37:   */   }
/* 38:   */   
/* 39:   */   public Map<String, String> parseTicketProperties()
/* 40:   */   {
/* 41:39 */     HashMap localHashMap = new HashMap();
/* 42:40 */     StringTokenizer localStringTokenizer = new StringTokenizer(this.e, "\t", false);
/* 43:41 */     while (localStringTokenizer.hasMoreTokens())
/* 44:   */     {
/* 45:42 */       String str1 = localStringTokenizer.nextToken();
/* 46:43 */       String str2 = str1.substring(0, str1.indexOf("="));
/* 47:44 */       String str3 = str1.substring(str1.indexOf("=") + 1);
/* 48:45 */       localHashMap.put(str2, str3);
/* 49:   */     }
/* 50:47 */     return localHashMap;
/* 51:   */   }
/* 52:   */   
/* 53:   */   public void setTicketProperties(String paramString)
/* 54:   */   {
/* 55:51 */     this.e = paramString;
/* 56:   */   }
/* 57:   */   
/* 58:   */   public long getProlongationPeriod()
/* 59:   */   {
/* 60:55 */     return this.f;
/* 61:   */   }
/* 62:   */   
/* 63:   */   public void setProlongationPeriod(long paramLong)
/* 64:   */   {
/* 65:59 */     this.f = paramLong;
/* 66:   */   }
/* 67:   */   
/* 68:   */   public String toString()
/* 69:   */   {
/* 70:63 */     return "ObtainTicketResponse[" + getResponseCode() + "," + this.d + ", " + this.f + "ms, " + getMessage() + "]";
/* 71:   */   }
/* 72:   */   
/* 73:   */   public static ObtainTicketResponse error(String paramString, ObtainTicketRequest paramObtainTicketRequest)
/* 74:   */   {
/* 75:67 */     return new ObtainTicketResponse(null, ResponseCode.ERROR, "", paramString, paramObtainTicketRequest.getSalt());
/* 76:   */   }
/* 77:   */ }



/* Location:           E:\idea\

 * Qualified Name:     com.jetbrains.licenseServer.openapi.responses.ObtainTicketResponse

 * JD-Core Version:    0.7.0.1

 */